<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  User: Dong Zou Date: 3/9/2016 Time: 3:37 PM
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Change Password - User - BIG Data Center</title>
</head>
<body>
<c:if test="${message == 'true'}">
    <div class="alert alert-success alert-dismissible fade in" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
        <strong>Congratulations!</strong> Successfully update your password!</div>
</c:if>

<c:if test="${message == 'false'}">
    <div class="alert alert-danger alert-dismissible fade in" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
        <strong>Sorry !</strong> Something wrong happened!</div>
</c:if>
<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">修改密码</h3>
    </div>
    <div class="panel-body">
        <form class="form-horizontal" method="post" name="userForm" action="${host}/ybp/passwordreset">
            <input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
           <%--  <input type="hidden" value="${currentUser.id}" name="id" /> --%>
            <div class="form-group">
                <label class="control-label col-md-2">请输入旧密码:</label>
                <div class="col-md-3">
                    <input type="password" class="form-control" name="opassword"/>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-md-2">请输入新密码:</label>
                <div class="col-md-3">
                    <input type="password" class="form-control" name="password"/>
                </div>
            </div>

            <div class="form-group">
                <label class="control-label col-md-2">请确认新密码:</label>
                <div class="col-md-3">
                    <input type="password" class="form-control" name="cpassword"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-2 col-md-offset-2">
                    <input type="hidden" name="id" value="${id}" />
                    <button type="submit" class="btn btn-success">更新</button>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
</html>
